﻿//#include "mytrendchart_p.h"

//MyTrendChartPrivate::MyTrendChartPrivate()
//    : imageLayerIndex(1),
//      deviceIndex(1),
//      objectType(XType::D),
//      objectIndex(0),
//      objectData(0),
//      valueType(XType::Word),
//      dataBaseType(XType::Dec),
//      dataCapacity(100),
//      collectionCycle(5),
//      YAxisUpperLimit(100),
//      YAxisLowerLimit(0),
//      collectionEnable(true),
//      chartPattern(XType::Line_Chart),
//      chartDisplayPattern(XType::StaticPaper_DynamicPen)
//{

//}

//MyTrendChartPrivate::~MyTrendChartPrivate()
//{

//}

//MyTrendChart::MyTrendChart()
//    : d(new MyTrendChartPrivate)
//{

//}

//MyTrendChart::~MyTrendChart()
//{
//    delete d;
//}

///*!
//    \property MyTrendChart::imageLayerIndex
//    \brief the index of the imageLayer

//    The imageLayer is the layer of the widget.

//    The default imageLayerIndex is 1.

//    \sa indent
//*/
//int MyTrendChart::getImageLayerIndex() const
//{
//    return d->imageLayerIndex;
//}

//void MyTrendChart::setImageLayerIndex(int imageLayerInd)
//{
//    if(d->imageLayerIndex == imageLayerInd)
//        return;
//    d->imageLayerIndex = imageLayerInd;
//}

///*!
//    \property MyTrendChart::deviceIndex
//    \brief the index of the paired device

//    The Device is the paired PLC.

//    The default imageLayerIndex is 0.

//    \sa indent
//*/
//int MyTrendChart::getDeviceIndex() const
//{
//    return d->deviceIndex;
//}

//void MyTrendChart::setDeviceIndex(int deviceInd)
//{
//    if(d->deviceIndex == deviceInd)
//        return;
//    d->deviceIndex = deviceInd;
//}

///*!
//    \property MyTrendChart::objectType
//    \brief the type of the object

//    The object is coil or register of PLC.

//    The default objectType is D.

//    \sa indent
//*/
//XType::ObjectType MyTrendChart::getObjectType() const
//{
//    return d->objectType;
//}

//void MyTrendChart::setObjectType(XType::ObjectType type)
//{
//    if(d->objectType == type)
//        return;
//    d->objectType = type;
//}

///*!
//    \property MyTrendChart::objectIndex
//    \brief the index of the object

//    The default index is 0.

//    \sa indent
//*/
//int MyTrendChart::getObjectIndex() const
//{
//    return d->objectIndex;
//}

//void MyTrendChart::setObjectIndex(int index)
//{
//    if(d->objectIndex == index)
//        return;
//    d->objectIndex = index;
//}

///*!
//    \property MyTrendChart::objectData
//    \brief the data of the object

//    The default objectData is 0.

//    \sa indent
//*/
//double MyTrendChart::getObjectData() const
//{
//    return d->objectData;
//}

//void MyTrendChart::setObjectData(double data)
//{
//    if(d->objectData == data)
//        return;
//    d->objectData = data;
//}

//void MyTrendChart::setObjectData(int data)
//{
//    setObjectData((double)data);
//}

///*!
//    \property MyTrendChart::valueType
//    \brief the type of the value

//    The default valueType is Word.

//    \sa indent
//*/
//XType::ValueType MyTrendChart::getValueType() const
//{
//    return d->valueType;
//}

//void MyTrendChart::setValueType(XType::ValueType type)
//{
//    if(d->valueType == type)
//        return;

//    d->valueType = type;
//}

///*!
//    \property MyTrendChart::dataBaseType
//    \brief the type of the data

//    The default dataBaseType is Dec.

//    \sa indent
//*/
//XType::DataBaseFormat MyTrendChart::getDataBaseType() const
//{
//    return d->dataBaseType;
//}

//void MyTrendChart::setDataBaseType(XType::DataBaseFormat format)
//{
//    if(d->dataBaseType == format)
//        return;
//    d->dataBaseType = format;
//}

///*!
//    \property MyTrendChart::dataCapacity
//    \brief the Capacity of the data

//    The default dataCapacity is 100.

//    \sa indent
//*/
//int MyTrendChart::getDataCapacity() const
//{
//    return d->dataCapacity;
//}

//void MyTrendChart::setDataCapacity(int capacity)
//{
//    if(d->dataCapacity == capacity)
//        return;
//    d->dataCapacity = capacity;
//}

///*!
//    \property MyTrendChart::collectionCycle
//    \brief the cycle of the collection

//    The default collectionCycle is 5.

//    \sa indent
//*/
//int MyTrendChart::getCollectionCycle() const
//{
//    return d->collectionCycle;
//}

//void MyTrendChart::setCollectionCycle(int cycle)
//{
//    if(d->collectionCycle == cycle)
//        return;
//    d->collectionCycle = cycle;
//}

///*!
//    \property MyTrendChart::YAxisUpperLimit
//    \brief the upperLimit of the YAxis

//    The default YAxisUpperLimit is 100.

//    \sa indent
//*/
//int MyTrendChart::getYAxisUpperLimit() const
//{
//    return d->YAxisUpperLimit;
//}

//void MyTrendChart::setYAxisUpperLimit(int limit)
//{
//    if(d->YAxisUpperLimit == limit)
//        return;
//    d->YAxisUpperLimit = limit;
//}

///*!
//    \property MyTrendChart::YAxisLowerLimit
//    \brief the lowerLimit of the YAxis

//    The default YAxisLowerLimit is 0.

//    \sa indent
//*/
//int MyTrendChart::getYAxisLowerLimit() const
//{
//    return d->YAxisLowerLimit;
//}

//void MyTrendChart::setYAxisLowerLimit(int limit)
//{
//    if(d->YAxisLowerLimit == limit)
//        return;
//    d->YAxisLowerLimit = limit;
//}

///*!
//    \property MyTrendChart::collectionEnable
//    \brief the enable of the collection

//    The default collectionEnable is true.

//    \sa indent
//*/
//bool MyTrendChart::getCollectionEnable() const
//{
//    return d->collectionEnable;
//}

//void MyTrendChart::setCollectionEnable(bool enable)
//{
//    if(d->collectionEnable == enable)
//        return;
//    d->collectionEnable = enable;
//}

///*!
//    \property MyTrendChart::chartPattern
//    \brief the pattern of the chart

//    The default chartPattern is Line_Chart.

//    \sa indent
//*/
//XType::ChartPattern MyTrendChart::getChartPattern() const
//{
//    return d->chartPattern;
//}

//void MyTrendChart::setChartPattern(XType::ChartPattern pattern)
//{
//    if(d->chartPattern == pattern)
//        return;
//    d->chartPattern = pattern;
//}

///*!
//    \property MyTrendChart::chartDisplayPattern
//    \brief the pattern of the chartDisplay

//    The default chartDisplayPattern is Line_Chart.

//    \sa indent
//*/
//XType::ChartDisplayPattern MyTrendChart::getChartDisplayPattern() const
//{
//    return d->chartDisplayPattern;
//}

//void MyTrendChart::setChartDisplayPattern(XType::ChartDisplayPattern pattern)
//{
//    if(d->chartDisplayPattern == pattern)
//        return;
//    d->chartDisplayPattern = pattern;
//}




